package com.song.studylineserver.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName el_exam
 */
@TableName(value ="el_exam")
@Data
public class Exam implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long examId;

    /**
     * 试卷名称
     */
    private String examName;

    /**
     * 试卷类型 1为练习卷 2为测验卷 3为期末卷
     */
    private Integer examType;

    /**
     * 作者id
     */
    private String examCreateby;

    /**
     * 学年
     */
    private String examYear;

    /**
     * 学期
     */
    private String examTerm;

    /**
     * 单选题集
     */
    private String examSingle;

    /**
     * 多选题集
     */
    private String examMult;

    /**
     * 填空题集
     */
    private String examFill;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Exam other = (Exam) that;
        return (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId()))
            && (this.getExamName() == null ? other.getExamName() == null : this.getExamName().equals(other.getExamName()))
            && (this.getExamType() == null ? other.getExamType() == null : this.getExamType().equals(other.getExamType()))
            && (this.getExamCreateby() == null ? other.getExamCreateby() == null : this.getExamCreateby().equals(other.getExamCreateby()))
            && (this.getExamYear() == null ? other.getExamYear() == null : this.getExamYear().equals(other.getExamYear()))
            && (this.getExamTerm() == null ? other.getExamTerm() == null : this.getExamTerm().equals(other.getExamTerm()))
            && (this.getExamSingle() == null ? other.getExamSingle() == null : this.getExamSingle().equals(other.getExamSingle()))
            && (this.getExamMult() == null ? other.getExamMult() == null : this.getExamMult().equals(other.getExamMult()))
            && (this.getExamFill() == null ? other.getExamFill() == null : this.getExamFill().equals(other.getExamFill()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode());
        result = prime * result + ((getExamName() == null) ? 0 : getExamName().hashCode());
        result = prime * result + ((getExamType() == null) ? 0 : getExamType().hashCode());
        result = prime * result + ((getExamCreateby() == null) ? 0 : getExamCreateby().hashCode());
        result = prime * result + ((getExamYear() == null) ? 0 : getExamYear().hashCode());
        result = prime * result + ((getExamTerm() == null) ? 0 : getExamTerm().hashCode());
        result = prime * result + ((getExamSingle() == null) ? 0 : getExamSingle().hashCode());
        result = prime * result + ((getExamMult() == null) ? 0 : getExamMult().hashCode());
        result = prime * result + ((getExamFill() == null) ? 0 : getExamFill().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", examId=").append(examId);
        sb.append(", examName=").append(examName);
        sb.append(", examType=").append(examType);
        sb.append(", examCreateby=").append(examCreateby);
        sb.append(", examYear=").append(examYear);
        sb.append(", examTerm=").append(examTerm);
        sb.append(", examSingle=").append(examSingle);
        sb.append(", examMult=").append(examMult);
        sb.append(", examFill=").append(examFill);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}